
<%@ page import="myfirstgrailsproject.Enrollment"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="main" />
<g:set var="entityName"
	value="${message(code: 'enrollment.label', default: 'Enrollment')}" />
<title><g:message code="default.show.label" args="[entityName]" />
</title>
</head>
<body>
	<div class="nav">

		<span class="menuButton"><a class="home"
			href="${createLink(uri: '/')}"><g:message
					code="default.home.label" /> </a> </span>
		<g:if test="${session?.user?.admin || session?.user?.instructor}">
			<span class="menuButton"><g:link class="list" action="list">
					<g:message code="default.list.label" args="[entityName]" />
				</g:link> </span>
			<span class="menuButton"><g:link class="create"
					action="create">
					<g:message code="default.new.label" args="[entityName]" />
				</g:link> </span>
		</g:if>
	</div>
	<div class="body">
		<h1>
			<g:message code="default.show.label" args="[entityName]" />
		</h1>
		<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>
		<div class="dialog">
			<table>
				<tbody>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="enrollment.course.label" default="Course" /></td>

						<td valign="top" class="value"><g:link controller="course"
								action="show" id="${enrollmentInstance?.course?.id}">
								${enrollmentInstance?.course?.encodeAsHTML()}
							</g:link></td>

					</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="enrollment.user.label" default="User" /></td>

						<td valign="top" class="value"><g:link controller="user"
								action="show" id="${enrollmentInstance?.user?.id}">
								${enrollmentInstance?.user?.encodeAsHTML()}
							</g:link></td>

					</tr>

				</tbody>
			</table>
		</div>
		<g:if
			test="${session?.user?.username.equals(enrollmentInstance?.user?.username)}">
			<div class="buttons">
				<g:form>
					<g:hiddenField name="id" value="${enrollmentInstance?.id}" />
					<span class="button"><g:actionSubmit class="delete"
							action="delete"
							value="${message(code: 'default.button.delete.label', default: 'Delete')}"
							onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
					</span>
				</g:form>
			</div>
		</g:if>
	</div>
</body>
</html>
